@prefix-cls: ~'inbiz-component-permission-config';

.@{prefix-cls} {
  width: 100%;
}

.pane-action {
  display: flex;
  width: 100%;
  height: 335px;
  border: 1px solid #ddd;

  .left-content {
    display: flex;
    flex-direction: column;
    width: 185px;
    height: 100%;
    border-right: 1px solid #ddd;

    .left-content-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 53px;
      padding: 0 10px 0 14px;
      border-bottom: 1px solid #ddd;

      > span {
        font-size: 14px;
      }

      > div {
        color: var(--inbiz-color-primary);
        font-size: 12px;
        cursor: pointer;
      }
    }

    .left-content-list {
      flex: 1;
      overflow-y: auto;

      .left-content-list-item {
        display: flex;
        align-items: center;
        height: 32px;
        padding: 0 10px 0 13px;
        overflow: hidden;
        color: #666;
        cursor: pointer;

        &-active {
          color: var(--inbiz-color-primary);
          background-color: var(--ant-primary-1);
        }

        > span {
          flex: 1;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }

        > div {
          display: none;
          width: 14px;
          cursor: pointer;

          &:hover {
            color: var(--inbiz-color-primary);
          }
        }

        &:hover {
          background-color: #fafafa;

          & > div {
            display: block;
          }
        }
      }
    }
  }

  .right-content {
    flex: 1;
    overflow: hidden;

    .table-title-nav {
      display: flex;
      justify-content: space-between;
    }

    :global {
      .ant-table-title {
        padding: 10px 16px;
        border-top: none;
        border-right: none;
        border-bottom: 1px solid #ddd;
        border-left: none;
      }

      .ant-table-tbody > tr > td:first-child,
      .ant-table-thead > tr > th:first-child {
        padding: 0 !important;
      }

      .ant-table-tbody > tr:last-child > td {
        border-color: #f0f0f0;
      }

      .editable-cell {
        position: relative;
      }

      .ant-table-header .ant-table-cell {
        padding: 10px;
      }

      .ant-table-body .ant-table-cell {
        padding: 5px;
      }

      .editable-cell-value-wrap {
        min-height: 32px;
        padding: 5px 12px;
        cursor: pointer;
      }

      .editable-cell-value-wrap:hover {
        padding: 4px 11px;
        border: 1px solid #d9d9d9;
        border-radius: 2px;
      }

      .editable-cell-value-wrap-disabled:hover {
        border-color: transparent;
      }

      .ant-table.ant-table-bordered > .ant-table-container {
        border-left: none;
      }

      .ant-table.ant-table-bordered
        > .ant-table-container
        > .ant-table-content
        > table,
      .ant-table.ant-table-bordered
        > .ant-table-container
        > .ant-table-header
        > table {
        border-top: none;
      }
    }
  }
}

.inbiz-component-TreeAndTable-picker {
  .content {
    display: flex;
    background-color: #fff;
    border: 1px solid #ddd;

    .left-tree {
      width: 185px;
      height: 100%;
      // padding-top: 10px;
      // padding-bottom: 10px;
      overflow: auto;
      font-size: 12px;
      background-color: #fff;
      border-right: solid 1px #ddd;

      :global(.ant-tree-list-holder-inner) {
        padding-top: 3px;
      }

      :global(.ant-tree-treenode) {
        display: flex;
        height: 32px;
        color: #000;
      }

      :global(.ant-tree-node-content-wrapper) {
        display: flex;
        flex: 1;
        overflow: hidden;
      }

      :global(.ant-tree-treenode-selected) {
        color: #000;
      }

      :global(
          .ant-tree.ant-tree-directory
            .ant-tree-treenode-selected
            .ant-tree-switcher
        ) {
        color: #000;
      }

      :global(.ant-tree-switcher_open) {
        svg {
          color: #aaa;
        }
      }

      :global(.ant-tree.ant-tree-directory .ant-tree-treenode)::before {
        top: -4px;
      }

      :global(.ant-tree-title) {
        flex: 1;
        overflow: hidden;
        color: #000;
        white-space: nowrap;
        text-overflow: ellipsis;
      }

      :global(.ant-tree-treenode-selected):hover::before {
        // background-color: var(--ant-primary-color-active-deprecated-d-02);
        background-color: #e7f3ff;
      }

      :global(.ant-tree-treenode-selected)::before {
        background-color: #e7f3ff;
        // background-color: var(--ant-primary-1);
      }

      > p {
        display: flex;
        align-items: center;
        width: 100%;
        height: 40px;
        margin-bottom: 0;
        padding-left: 9px;
        cursor: pointer;

        > span {
          margin-left: 7px;
        }
      }

      .app-selected {
        background-color: var(--ant-primary-1);
      }

      .app-selected:hover {
        background-color: var(--ant-primary-1);
      }

      .left-group-box {
        width: 100%;
        height: 315px;
        overflow-y: auto;

        .group-item {
          display: flex;
          align-items: center;
          width: 100%;
          height: 32px;
          margin-bottom: 0;
          padding-left: 30px;
          cursor: pointer;

          > span {
            margin-left: 7px;
          }

          &:hover {
            background-color: rgba(0, 0, 0, 0.02);
          }
        }

        .active {
          background-color: var(--ant-primary-1);
        }

        .active:hover {
          background-color: var(--ant-primary-1);
        }
      }
    }

    .right-nav {
      display: flex;
      flex: 1;
      flex-direction: column;
      max-width: 573px;

      :global(.ant-input-affix-wrapper svg) {
        font-size: 16px;
      }

      .page-list {
        flex: 1;
        width: 100%;
        margin-top: 10px;
        overflow: hidden;

        :global(.ant-table-tbody > tr.ant-table-row-selected > td) {
          background: #e7f3ff;
          &:hover {
            background: #e7f3ff;
          }
        }

        :global(.ant-table-row) {
          &:hover {
            cursor: pointer;
          }
        }

        .page-list-header {
          width: 100%;
          height: 32px;
          padding: 0 30px;
          color: #666;
          line-height: 31px;
          border-top: 1px solid #eee;
          border-bottom: 1px solid #eee;
        }

        .page-lsit-nav {
          width: 100%;
          height: 346px;
          overflow: hidden auto;

          .list-item {
            width: 100%;
            height: 41px;
            padding: 0 30px;
            line-height: 40px;
            border-bottom: 1px solid #eee;
            cursor: pointer;

            :global {
              .ant-checkbox-wrapper {
                display: flex;

                > span:last-child {
                  flex: 1;
                }
              }
            }
          }

          .list-item:hover {
            background-color: rgba(0, 0, 0, 0.02);
          }

          .page-active {
            background-color: #e7f3ff;
          }

          .page-active:hover {
            background-color: #cbe4fd;
          }
        }
      }

      :global {
        .ant-table-body {
          overflow-y: auto !important;
        }

        .ant-input-affix-wrapper {
          width: 260px;
          margin: 10px 0 0 10px;
        }

        .ant-empty {
          margin-top: 130px;
        }

        .ant-spin-nested-loading {
          flex: 1;
        }

        .ant-table-placeholder {
          > td {
            border-color: transparent;
          }
        }
      }
    }
  }

  .checked-list {
    height: 100px;
    padding: 13px 0;
    overflow: hidden auto;

    .checked-item {
      display: inline-flex;
      align-items: center;
      height: 24px;
      margin: 0 10px 5px 0;
      padding: 3px 8px;
      font-size: 12px;
      background-color: #f8f8f8;
      border-radius: 2px;
      :global {
        .anticon-close-circle {
          margin-left: 5px;
          color: #c7c7c7;
          font-size: 13px;
          cursor: pointer;
          // &:hover {
          //   color: #c7c7c7;
          // }
        }
      }
    }
  }

  :global {
    .ant-table-header {
      border-top: 1px solid #f0f0f0;
    }

    .ant-table-tbody > tr > td:first-child,
    .ant-table-thead > tr > th:first-child {
      padding-left: 13px !important;
    }

    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    ::-webkit-scrollbar-thumb {
      background-color: rgba(0, 0, 0, 0.1);
      border-radius: 3px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background-color: rgba(0, 0, 0, 0.2);
    }
  }
}

.page-select-model-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;

  .select-count-nav {
    > p {
      margin-bottom: 0;

      > span:first-child {
        color: var(--inbiz-color-primary);
      }
    }
  }
}

.action-self-nav {
  :global {
    .ant-table {
      border-top: 1px solid #ddd;
      border-right: 1px solid #ddd;
      border-left: 1px solid #ddd;
    }

    .ant-input-affix-wrapper {
      width: 260px;
      margin-bottom: 20px;
    }

    .ant-table-tbody .ant-table-measure-row > td:first-child {
      padding: 0 !important;
    }

    .ant-table-tbody > tr > td:first-child,
    .ant-table-thead > tr > th:first-child {
      padding: 8px 0 8px 16px !important;
    }
  }
}
